nums = [3,6,10,14,2,7,1,8]
result = []
for i in range(len(nums)):
    for j in range(i+1,len(nums)):
        if nums[i]+nums[j] == 9:
            result.append((nums[i],nums[j]))
print(result)











